package top.kaoshanji.p1ch01a;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 代码清单-p1ch01a-10页a：加载包含Knight的Spring上下文
 * @author kaoshanji
 * ^_^
 * create time 2025/4/22 10:09
 */
public class KnightMain {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/knights.xml");

        Knight knight = context.getBean(Knight.class);
        knight.embarkOnQuest();

        context.close();
    }

}
